#!/bin/bash
# usage = makeThumbnail path file page
# WARNING : file = .pdf
# exemple : ./makeThumbnail.sh ./uploads/google/ google.pdf 2 243


path=$1
file=$2
page=$3
id=$4

cd $path

mkdir thumbs

convert $file[$page] thumbs/$4.gif